const defaultState={
    title:"",
    img:"",
    content:"",
    auther:{
        name:"",
        ioc:"",
        time:"",
        readNum:'',
        likeNum:'',
        commentNum:'', 
        wordNum: '',
    }
}
export default (state=defaultState,action) => {
    switch(action.type){
        case 'GET_ARTICLE_DETAILs_DATE':
            state.title=action.data.title;
            state.img =action.data.img;
            state.content=action.data.content;
            state.auther.name=action.data.auther.name;
            state.auther.ioc=action.data.auther.ioc;
            state.auther.publishTime=action.data.auther.time;
            state.auther.readNum=action.data.auther.readNum;
            state.auther.likeNum=action.data.auther.likeNum;
            state.auther.commentNum=action.data.auther.commentNum;
            state.auther.wordNum=action.data.auther.wordNum;
            return {...state}
        default:
            return state
    }
    
}